import React from "react";
import styles from "./index.module.less";
import SvgIcon from "@components/SvgIcon";
import { useNavigate } from "react-router-dom";

const Board = (props) => {
    const { url, font, title, intro } = props;
    const navigate = useNavigate();

    return (
        <div className={styles.board}>
            <div
                className={styles.title}
                onClick={() => {
                    navigate(`/messageBoard/${url}`);
                }}
            >
                <div className={styles.title_icon}>
                    <SvgIcon font={font} />
                </div>
                <p className={styles.title_text}>{title}</p>
                <div className={styles.left_line}></div>
                <div className={styles.rig_line}></div>
            </div>
            <div className={styles.main}>
                <p className={styles.introduction}>{intro}</p>
            </div>
        </div>
    );
};

export default Board;
